package www.com.library.view;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by reeta.zou on 2017/3/13.
 * 表格式的recyclerview分割线
 */

public class RecyclerViewDecoration  extends RecyclerView.ItemDecoration {
    private int space;
    public RecyclerViewDecoration(int space) {
        this.space = space;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view,
                               RecyclerView parent, RecyclerView.State state) {
        outRect.top = space;
        outRect.left = space / 2;
        outRect.right = space / 2;


    }
}
